package com.hzhr.iot.device.controller;

import com.hzhr.iot.core.annotation.ApiImplicitInternalParams;
import com.hzhr.iot.core.annotation.Author;
import com.hzhr.iot.core.exception.ServiceException;
import com.hzhr.iot.device.controller.base.BaseController;
import com.hzhr.iot.device.model.implRecord.ImplRecordDeleteModel;
import com.hzhr.iot.device.model.implRecord.ImplRecordGetModel;
import com.hzhr.iot.device.model.implRecord.ImplRecordPostModel;
import com.hzhr.iot.device.model.implRecord.ImplRecordPutModel;
import com.hzhr.iot.device.service.ImplRecordService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import java.util.Map;

@Api(tags = "ImplRecord", description = "实施档案")
@RestController
@RequestMapping(value = "")
public class ImplRecordController extends BaseController {
    @Autowired
    ImplRecordService implRecordService;

    //region /impl-records POST
    //region swagger响应码 : post
    @ApiResponses({
            @ApiResponse(code = 200, message = "成功"),
    })
    //endregion
    //region swagger说明 : post
    @ApiOperation(value="创建实施档案", notes="创建实施档案  \n简介 : 创建实施档案；更新设备信息  \n步骤 :  \n1. 创建实施档案  \n2. 更新实施档案所对应的设备的相关信息  \n3. 关联实施档案和设备  \n4. 关联设备：如果该实施档案所对应的采集设备为调压箱或调压柜，须将对应的物联网设备组装到采集设备上来  \n5. 返回信息  \n",produces = "application/json")
    //endregion
    //region swagger参数 : post
    @ApiImplicitParams({
            @ApiImplicitParam(name = "token", value = "令牌",required = true, dataType = "string", paramType = "header"),

            @ApiImplicitParam(name = "show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),

    })
    @ApiImplicitInternalParams({
            @ApiImplicitParam(name = "_token", value = "令牌",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-id", value = "用户编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-code", value = "用户代码",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-name", value = "用户名",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-company-id", value = "公司编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-dept-id", value = "部门编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-type", value = "用户类型(关联: common_service.options.code, typeCode = 'USER_TYPE')",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-id", value = "交易流水号",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-type", value = "交易类型",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-access-mode", value = "访问模式 0:一般 1:全局",defaultValue = "0", required = false, dataType = "int", paramType = "header"),

            @ApiImplicitParam(name = "_show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),

    })
    //endregion
    //region 请求 : post
    @RequestMapping(value = "/impl-records", method = RequestMethod.POST)
    //endregion
    @Author
    public ResponseEntity<ImplRecordGetModel> post(@RequestParam @ApiIgnore Map<String, Object> query,
                                                   @RequestBody ImplRecordPostModel body) throws ServiceException {
        ImplRecordGetModel responseBody = implRecordService.post(initHeader(), query, body);
        return new ResponseEntity<>(responseBody, HttpStatus.OK);
        //endregion
    }
    //endregion
    //region /impl-records/{implRecordId} DELETE
    //region swagger响应码 : deleteById
    @ApiResponses({
            @ApiResponse(code = 200, message = "成功"),
    })
    //endregion
    //region swagger说明 : deleteById
    @ApiOperation(value="删除登录用户所创建的物联网设备", notes="删除登录用户所创建的物联网设备  \n范围 : 删除登录用户所创建的物联网设备  \n步骤 :  \n1. 删除实施档案  \n2. 返回信息  \n",produces = "application/json")
    //endregion
    //region swagger参数 : deleteById
    @ApiImplicitParams({
            @ApiImplicitParam(name = "token", value = "令牌",required = true, dataType = "string", paramType = "header"),

            @ApiImplicitParam(name = "implRecordId", value = "实施档案编号",required = true, dataType = "int", paramType = "path"),
    })
    @ApiImplicitInternalParams({
            @ApiImplicitParam(name = "_token", value = "令牌",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-id", value = "用户编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-code", value = "用户代码",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-name", value = "用户名",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-company-id", value = "公司编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-dept-id", value = "部门编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-type", value = "用户类型(关联: common_service.options.code, typeCode = 'USER_TYPE')",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-id", value = "交易流水号",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-type", value = "交易类型",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-access-mode", value = "访问模式 0:一般 1:全局",defaultValue = "0", required = false, dataType = "int", paramType = "header"),
    })
    //endregion
    //region 请求 : deleteById
    @RequestMapping(value = "/impl-records/{implRecordId}", method = RequestMethod.DELETE)
    //endregion
    @Author
    public ResponseEntity<ImplRecordDeleteModel> deleteById(@PathVariable("implRecordId") Integer implRecordId,
                                                            @RequestParam @ApiIgnore Map<String, Object> query) throws ServiceException {
        ImplRecordDeleteModel responseBody = implRecordService.deleteById(initHeader(), implRecordId, query);
        return new ResponseEntity<>(responseBody, HttpStatus.OK);
        //endregion
    }
    //endregion
    //region /impl-records/{implRecordId} PUT
    //region swagger响应码 : putById
    @ApiResponses({
            @ApiResponse(code = 200, message = "成功"),
    })
    //endregion
    //region swagger说明 : putById
    @ApiOperation(value="更新登录用户所创建的实施档案", notes="更新登录用户所创建的实施档案  \n范围 : 更新登录用户所创建的实施档案  \n步骤 :  \n1. 查询实施档案  \n2. 更新实施档案  \n3. 更新实施档案所对应的设备的相关信息  \n4. 关联实施档案和设备  \n5. 关联设备：如果该实施档案所对应的采集设备为调压箱或调压柜，须将对应的物联网设备组装到采集设备上来  \n6. 返回信息  \n",produces = "application/json")
    //endregion
    //region swagger参数 : putById
    @ApiImplicitParams({
            @ApiImplicitParam(name = "token", value = "令牌",required = true, dataType = "string", paramType = "header"),

            @ApiImplicitParam(name = "implRecordId", value = "实施档案编号",required = true, dataType = "int", paramType = "path"),

            @ApiImplicitParam(name = "show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),

    })
    @ApiImplicitInternalParams({
            @ApiImplicitParam(name = "_token", value = "令牌",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-id", value = "用户编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-code", value = "用户代码",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-name", value = "用户名",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-company-id", value = "公司编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-dept-id", value = "部门编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-type", value = "用户类型(关联: common_service.options.code, typeCode = 'USER_TYPE')",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-id", value = "交易流水号",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-type", value = "交易类型",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-access-mode", value = "访问模式 0:一般 1:全局",defaultValue = "0", required = false, dataType = "int", paramType = "header"),

            @ApiImplicitParam(name = "_show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),

    })
    //endregion
    //region 请求 : putById
    @RequestMapping(value = "/impl-records/{implRecordId}", method = RequestMethod.PUT)
    //endregion
    @Author
    public ResponseEntity<ImplRecordGetModel> putById(@PathVariable("implRecordId") Integer implRecordId,
                                                  @RequestParam @ApiIgnore Map<String, Object> query,
                                                  @RequestBody ImplRecordPutModel body) throws ServiceException {
        ImplRecordGetModel responseBody = implRecordService.putById(initHeader(), implRecordId, query, body);
        return new ResponseEntity<>(responseBody, HttpStatus.OK);
        //endregion
    }
    //endregion
    //region /impl-records GET
    //region swagger响应码 : get
    @ApiResponses({
            @ApiResponse(code = 200, message = "成功"),
    })
    //endregion
    //region swagger说明 : get
    @ApiOperation(value="查询登录用户所创建实施档案", notes="查询登录用户所创建实施档案  \n简介 : 查询登录用户所创建实施档案  \n步骤 :  \n1. 查询实施档案 : (√)  \n 根据条件参数查询登录用户所创建的实施档案(IMPL_RECORD)；  \n2. 返回信息 : (√)  \n 根据条件参数和查询到的结果组装响应并返回；  \n",produces = "application/json")
    //endregion
    //region swagger参数 : get
    @ApiImplicitParams({
            @ApiImplicitParam(name = "token", value = "令牌",required = true, dataType = "string", paramType = "header"),

            @ApiImplicitParam(name = "show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_collectDevice", value = "是否展示采集设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_iotDevice", value = "是否展示物联网设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_gasUser", value = "是否展示燃气用户信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_id", value = "筛选条件 : where ImplRecordModel.id = #{equal_id}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_gasUserCode", value = "筛选条件 : where ImplRecordModel.gasUserCode = #{equal_gasUserCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "equal_deptId", value = "筛选条件 : where ImplRecordModel.deptId = #{equal_deptId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_subCompanyId", value = "筛选条件 : where ImplRecordModel.subCompanyId = #{equal_subCompanyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_createUserId", value = "筛选条件 : where ImplRecordModel.createUserId = #{equal_createUserId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_iotDeviceCode", value = "筛选条件 : where ImplRecordModel.iotDeviceCode = #{equal_iotDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "equal_collectDeviceCode", value = "筛选条件 : where ImplRecordModel.collectDeviceCode = #{equal_collectDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "orderBy_implementTime", value = "筛选条件 : orderBy ImplRecordModel.implementTime #{orderBy_implementTime}",required = false, dataType = "string", paramType = "query"),

    })
    @ApiImplicitInternalParams({
            @ApiImplicitParam(name = "_token", value = "令牌",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-id", value = "用户编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-code", value = "用户代码",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-name", value = "用户名",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-company-id", value = "公司编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-dept-id", value = "部门编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-type", value = "用户类型(关联: common_service.options.code, typeCode = 'USER_TYPE')",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-id", value = "交易流水号",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-type", value = "交易类型",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-access-mode", value = "访问模式 0:一般 1:全局",defaultValue = "0", required = false, dataType = "int", paramType = "header"),

            @ApiImplicitParam(name = "_show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_collectDevice", value = "是否展示采集设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_iotDevice", value = "是否展示物联网设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_gasUser", value = "是否展示燃气用户信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_id", value = "筛选条件 : where ImplRecordModel.id = #{_equal_id}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_gasUserCode", value = "筛选条件 : where ImplRecordModel.gasUserCode = #{_equal_gasUserCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_equal_deptId", value = "筛选条件 : where ImplRecordModel.deptId = #{_equal_deptId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_subCompanyId", value = "筛选条件 : where ImplRecordModel.subCompanyId = #{_equal_subCompanyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_createUserId", value = "筛选条件 : where ImplRecordModel.createUserId = #{_equal_createUserId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_iotDeviceCode", value = "筛选条件 : where ImplRecordModel.iotDeviceCode = #{_equal_iotDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_equal_collectDeviceCode", value = "筛选条件 : where ImplRecordModel.collectDeviceCode = #{_equal_collectDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_orderBy_implementTime", value = "筛选条件 : orderBy ImplRecordModel.implementTime #{_orderBy_implementTime}",required = false, dataType = "string", paramType = "query"),

    })
    //endregion
    //region 请求 : get
    @RequestMapping(value = "/impl-records", method = RequestMethod.GET)
    //endregion
    @Author
    public ResponseEntity<ImplRecordGetModel> get(@RequestParam @ApiIgnore Map<String, Object> query) throws ServiceException {
        ImplRecordGetModel responseBody = implRecordService.get(initHeader(), query);
        return new ResponseEntity<>(responseBody, HttpStatus.OK);
        //endregion
    }
    //endregion
    //region /v1/impl-records GET
    //region swagger响应码 : get1
    @ApiResponses({
            @ApiResponse(code = 200, message = "成功"),
    })
    //endregion
    //region swagger说明 : get1
    @ApiOperation(value="查询实施档案", notes="查询实施档案  \n简介 : 查询实施档案  \n步骤 :  \n1. 查询实施档案 : (√)  \n 根据条件参数查询登录用户所创建的实施档案(IMPL_RECORD)；  \n2. 返回信息 : (√)  \n 根据条件参数和查询到的结果组装响应并返回；  \n",produces = "application/json")
    //endregion
    //region swagger参数 : get1
    @ApiImplicitParams({
            @ApiImplicitParam(name = "token", value = "令牌",required = true, dataType = "string", paramType = "header"),

            @ApiImplicitParam(name = "show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_collectDevice", value = "是否展示采集设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_iotDevice", value = "是否展示物联网设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_gasUser", value = "是否展示燃气用户信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_id", value = "筛选条件 : where ImplRecordModel.id = #{equal_id}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_deptId", value = "筛选条件 : where ImplRecordModel.deptId = #{equal_deptId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_subCompanyId", value = "筛选条件 : where ImplRecordModel.subCompanyId = #{equal_subCompanyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_createUserId", value = "筛选条件 : where ImplRecordModel.createUserId = #{equal_createUserId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_iotDeviceCode", value = "筛选条件 : where ImplRecordModel.iotDeviceCode = #{equal_iotDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "equal_collectDeviceCode", value = "筛选条件 : where ImplRecordModel.collectDeviceCode = #{equal_collectDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "equal_code", value = "筛选条件 : where implRecord.code = #{equal_code}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_gasUserCode", value = "筛选条件 : where ImplRecordModel.gasUserCode = #{equal_gasUserCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_gasUserName", value = "筛选条件 : where ImplRecordModel.gasUserName like #{like_gasUserName}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_gasUserAddress", value = "筛选条件 : where ImplRecordModel.gasUserAddress like #{like_gasUserAddress}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "like_gasUserAddress", value = "筛选条件 : where ImplRecordModel.gasUserAddress like #{like_gasUserAddress}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "greaterthanorequal_implementTime", value = "筛选条件 : where ImplRecordModel.implementTime >= #{greaterthanorequal_implementTime}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "lessthanorequal_implementTime", value = "筛选条件 : where ImplRecordModel.implementTime <= #{greaterthanorequal_implementTime}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "in_code", value = "筛选条件 : where ImplRecordModel.code in #{in_code}",required = false, dataType = "string", paramType = "query"),

    })
    @ApiImplicitInternalParams({
            @ApiImplicitParam(name = "_token", value = "令牌",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-id", value = "用户编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-code", value = "用户代码",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-name", value = "用户名",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-company-id", value = "公司编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-dept-id", value = "部门编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-type", value = "用户类型(关联: common_service.options.code, typeCode = 'USER_TYPE')",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-id", value = "交易流水号",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-type", value = "交易类型",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-access-mode", value = "访问模式 0:一般 1:全局",defaultValue = "0", required = false, dataType = "int", paramType = "header"),

            @ApiImplicitParam(name = "_show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_collectDevice", value = "是否展示采集设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_iotDevice", value = "是否展示物联网设备信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_gasUser", value = "是否展示燃气用户信息", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_id", value = "筛选条件 : where ImplRecordModel.id = #{_equal_id}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_deptId", value = "筛选条件 : where ImplRecordModel.deptId = #{_equal_deptId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_subCompanyId", value = "筛选条件 : where ImplRecordModel.subCompanyId = #{_equal_subCompanyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_createUserId", value = "筛选条件 : where ImplRecordModel.createUserId = #{_equal_createUserId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_iotDeviceCode", value = "筛选条件 : where ImplRecordModel.iotDeviceCode = #{_equal_iotDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_equal_collectDeviceCode", value = "筛选条件 : where ImplRecordModel.collectDeviceCode = #{_equal_collectDeviceCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_equal_code", value = "筛选条件 : where implRecord.code = #{_equal_code}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_gasUserCode", value = "筛选条件 : where ImplRecordModel.gasUserCode = #{_equal_gasUserCode}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_like_gasUserName", value = "筛选条件 : where ImplRecordModel.gasUserName like #{_like_gasUserName}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_like_gasUserAddress", value = "筛选条件 : where ImplRecordModel.gasUserAddress like #{_like_gasUserAddress}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_greaterthanorequal_implementTime", value = "筛选条件 : where ImplRecordModel.implementTime >= #{_greaterthanorequal_implementTime}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_lessthanorequal_implementTime", value = "筛选条件 : where ImplRecordModel.implementTime <= #{_greaterthanorequal_implementTime}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_in_code", value = "筛选条件 : where ImplRecordModel.code in #{_in_code}",required = false, dataType = "string", paramType = "query"),

    })
    //endregion
    //region 请求 : get1
    @RequestMapping(value = "/v1/impl-records", method = RequestMethod.GET)
    //endregion
    @Author
    public ResponseEntity<ImplRecordGetModel> get1(@RequestParam @ApiIgnore Map<String, Object> query) throws ServiceException {
        ImplRecordGetModel responseBody = implRecordService.get1(initHeader(), query);
        return new ResponseEntity<>(responseBody, HttpStatus.OK);
        //endregion
    }
    //endregion
}


















































































































































































































































































































































































































































































































































































































































































